<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h3 id="hh">hello-随机文字颜色</h3>
<script>
    var wk = new Array('日','一','二','三','四','五','六');
    document.write("今日是：星期"+wk[new Date().getDay()]);

    var cs = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
    var  c = '#';
    c+=cs[Math.round(Math.random()*cs.length)];
    c+=cs[Math.round(Math.random()*cs.length)];
    c+=cs[Math.round(Math.random()*cs.length)];
    c+=cs[Math.round(Math.random()*cs.length)];
    c+=cs[Math.round(Math.random()*cs.length)];
    c+=cs[Math.round(Math.random()*cs.length)];
    document.write(c);
    //document.bgColor = c;
    document.getElementById('hh').style.color = c;
</script>
</body>
</html>